<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户注册</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f5f5f5;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        
        .register-container {
            background-color: white;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            width: 350px;
        }
        
        .register-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .register-header h1 {
            color: #333;
            font-size: 24px;
            margin-bottom: 10px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #555;
        }
        
        .form-group input {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
            font-size: 16px;
        }
        
        .form-group input:focus {
            border-color: #4a90e2;
            outline: none;
            box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
        }
        
        .terms {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .terms input {
            margin-right: 8px;
        }
        
        .register-button {
            width: 100%;
            padding: 12px;
            background-color: #4a90e2;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        
        .register-button:hover {
            background-color: #3a7bc8;
        }
        
        .login-link {
            text-align: center;
            margin-top: 25px;
            color: #666;
        }
        
        .login-link a {
            color: #4a90e2;
            text-decoration: none;
        }
        
        .login-link a:hover {
            text-decoration: underline;
        }
        
        .password-hint {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
        }
    </style>
</head>
<body>
    <div class="register-container">
        <div class="register-header">
            <h1>创建新账户</h1>
            <p>填写以下信息完成注册</p>
        </div>
        
        <form action="/register" method="POST">
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" name="username" placeholder="设置您的用户名" required>
            </div>
            
            <div class="form-group">
                <label for="email">电子邮箱</label>
                <input type="email" id="email" name="email" placeholder="请输入有效邮箱地址" required>
            </div>
            
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" placeholder="设置您的密码" required>
                <p class="password-hint">密码长度至少8位，包含字母和数字</p>
            </div>
            
            <div class="form-group">
                <label for="confirm-password">确认密码</label>
                <input type="password" id="confirm-password" name="confirm-password" placeholder="再次输入密码" required>
            </div>
            
            <div class="terms">
                <input type="checkbox" id="agree-terms" name="agree-terms" required>
                <label for="agree-terms">我已阅读并同意<a href="/terms" style="color: #4a90e2;">服务条款</a>和<a href="/privacy" style="color: #4a90e2;">隐私政策</a></label>
            </div>
            
            <button type="submit" class="register-button">注册</button>
        </form>
        
        <div class="login-link">
            已有账号? <a href="/login">立即登录</a>
        </div>
    </div>
</body>
</html>